# 打印边长为n个*的正方形
def print_triangle(lenth):
    for i in range(lenth):
        for i in range(lenth):
            print('*', end=' ')
        print()


print_triangle(2)
print_triangle(3)
print_triangle(4)


def add_modify(a, b):
    result = a + b
    print(result)

    def test():
        print('内层函数')

    test()


add_modify(10, 20)


def filtre_sensitive_words(words):
    if '山寨' in words:
        new_words = words.replace('山寨', '**')
        return new_words


result = filtre_sensitive_words('这个手机是山寨的')
print(result)


def move(x, y, step):
    nx = x
    ny = y - step
    return nx, ny


result = move(100, 100, 60)
print(result)


def func(a, b, /, c):
    print(a, b, c)


func(10, 20, c=30)
